export function ClickLock(cd: number) {
  return function (target: any, name: string, descriptor: PropertyDescriptor) {
    let oldMethod = descriptor.value;
    let isLock: boolean = false;
    descriptor.value = function () {
      if (isLock) {
        return;
      }
      isLock = true;
      setTimeout(() => {
        isLock = false;
      }, cd * 1000);
      oldMethod.apply(this, descriptor);
    };
    return descriptor;
  };
}
